package com.lai.hospital.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author : lai
 * @version V1.0
 * @Project: hospital-springboot
 * @Package com.lai.hospital.entity
 * @Description: 预约
 * @date Date : 2022年11月15日 0:49
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_appointment")
public class Appointment {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 就诊人id
     */
    private Integer patientId;

    /**
     * 医院id
     */
    private Integer hospitalId;

    /**
     * 科室id
     */
    private Integer departmentId;

    /**
     * 医生id
     */
    private Integer doctorId;

    /**
     * 预约时间
     */
    private Date appointmentTime;


    /**
     * 状态
     */
    private Integer appointmentStatus;

    /**
     * 取消原因
     */
    private String cancelReason;

    /**
     * 时间段 0上午 1下午
     */
    private Integer timeQuantum;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
